package com.spddr.pmos.repos;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import com.spddr.pmos.jpa.ReservoirLevelVolume;
import com.spddr.pmos.jpa.ReservoirLevelVolumeId;

public interface ReservoirLevelVolumeRepos extends JpaRepository<ReservoirLevelVolume, ReservoirLevelVolumeId> {
	List<ReservoirLevelVolume> findByIdReservoir(long reservoir);

	@Query("DELETE FROM ReservoirLevelVolume WHERE id.reservoir = ?")
	void deleteByReservoir(long reservoir);
}
